import request from '@/utils/request'
import qs from "qs";

// 渲染-获取科目下拉列表
export function getSubjects() {
  return request({
    url: '/tools-render/rendering/subjects',
    method: 'get',
  })
}

// 渲染-获取题号下拉列表
export function getQuestions(query) {
  return request({
    url: '/tools-render/rendering/quesId',
    method: 'post',
    data: query
  })
}

// 渲染-获取科目渲染列表
export function getSeek1(query) {
  return request({
    url: '/tools-render/rendering/seek1',
    method: 'get',
    params: query
  })
}

// 渲染-获取考生列表
export function getSeek2(query) {
  return request({
    url: '/tools-render/rendering/seek2',
    method: 'get',
    params: query
  })
}

// 渲染-批量渲染操作
export function readDBBatch(query) {
  return request({
    url: `/tools-render/rendering/readDB`,
    method: 'get',
    params: {},
    paramsSerializer: () => {
      return qs.stringify(query, { indices: false })
    }
  })
}

// 渲染-单个渲染操作
export function readDB(query, zkzNum) {
  return request({
    url: `/tools-render/rendering/readDB/${zkzNum}`,
    method: 'get',
    params: {},
    paramsSerializer: () => {
      return qs.stringify(query, { indices: false })
    }
  })
}
//
// // 渲染-考生列表-查看操作
// export function preview(zkzNum, quesId) {
//   return request({
//     url: `/tools-render/rendering/preview/${zkzNum}/${quesId}`,
//     method: 'get',
//   })
// }
